跳到主要内容

混合模式(BlendMode)

定义画笔颜色或渐变与底层内容的合成方式(compositing)。

  • srcOver
  • screen
  • overlay
  • darken
  • lighten
  • colorDodge
  • colorBurn
  • hardLight
  • softLight
  • difference
  • exclusion
  • multiply
  • hue
  • saturation
  • color
  • luminosity
-- Create a new paint with a color and multiply blend mode
self.paint = Paint.with({
color = Color.rgb(255, 100, 50),
blendMode = 'multiply',
style = 'fill',
})